<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>数据管理系统</title>

    <meta name="keywords" content="数据管理系统">
    <meta name="description" content="数据管理系统">

    <link rel="shortcut icon" href="/favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min.css?v=4.0.0" rel="stylesheet">
    <link href="/css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <style>
        .middle-box h1{
            font-size: 32px;
        }
    </style>
</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name">数据管理查询分析系统</h1>

            </div>
            <h3>欢迎使用</h3>

            <form class="m-t" role="form" method="post">
                <div class="form-group">
                    <input type="text" id="userName" class="form-control" placeholder="用户名" required="">
                </div>
                <div class="form-group">
                    <input type="password" id="password" class="form-control" placeholder="密码" required="">
                </div>
                <button type="button" id="okbtn" class="btn btn-primary block full-width m-b">登 录</button>

            </form>
        </div>
    </div>

    <!-- 全局js -->
    <script src="/js/jquery-3.3.1.js"></script>
    <script src="/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/js/utils.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#okbtn").on("click",function () {
                window.top.location.href="/home.html";
//                var userName = $.trim($("#userName").val());
//                var password = $.trim($("#password").val());
//                if(userName===""){
//                    return false;
//                }
//                if(password===""){
//                    return false;
//                }
//                $.ajax({
//                    url:"/api/admin/authorization/authorize",
//                    type:"post",
//                    dataType:"json",
//                    data:{"userName":userName,"password":password},
//                    async:false,
//                    success:function (d) {
//                        console.log(d);
//                        if(d.status===200){
//                            var token = d.data;
//                            getStorage().setItem("token",token);
//                            window.top.location.href="/home.html";
//                        }else {
//                            alert(d.message);
//                        }
//                    },
//                    error:function (d) {
//                        console.log(d);
//                    }
//                });

                return false;
            });


        });
        
        
    </script>

</body>

</html>
